﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{
    public class CConfig
    {

    #region fields

        private CDare m_dare;
        private CGeneralConfig m_generalConfig;
        private CAudioConfig m_audioConfig;
        private CVideoConfig m_videoConfig;
        private CPhysicsConfig m_physicsConfig;
        private CTimeConfig m_timeConfig;

    #endregion

    #region properties

        public CDare Dare
        {
            get { return m_dare; }
        }

        public CGeneralConfig General
        {
            get { return m_generalConfig; }
        }

        public CAudioConfig Audio
        {
            get { return m_audioConfig; }
        }

        public CVideoConfig Video
        {
            get { return m_videoConfig; }
        }

        public CPhysicsConfig Physics
        {
            get { return m_physicsConfig; }
        }

        public CTimeConfig Time
        {
            get { return m_timeConfig; }
        }

    #endregion

    #region ctor

        public CConfig()
        {
            Initialize(CDare.Instance);
        }

        public CConfig(CDare dare)
        {
            Initialize(dare);
        }

        private void Initialize(CDare dare)
        {
            m_dare = dare;
            m_generalConfig = new CGeneralConfig(dare);
            m_audioConfig = new CAudioConfig(dare);
            m_videoConfig = new CVideoConfig(dare);
            m_physicsConfig = new CPhysicsConfig(dare);
            m_timeConfig = new CTimeConfig(dare);
        }

    #endregion

    }
}
